package com.zhangmengyuan.medical.service.impl;

import com.zhangmengyuan.medical.dao.OrderinfoDao;
import com.zhangmengyuan.medical.entity.Orderinfo;
import com.zhangmengyuan.medical.service.OrderinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderinfoServiceImpl implements OrderinfoService{
    @Autowired
    private OrderinfoDao orderinfoDao;

    @Override
    public void save(Orderinfo orderinfo) {
        orderinfoDao.save(orderinfo);
    }

    @Override
    public List<Orderinfo> getAll() {
        return orderinfoDao.findAll();
    }

    @Override
    public Orderinfo getById(Integer orderinfoId) {
        return orderinfoDao.findOne(orderinfoId);
    }

}
